﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once
#include "GcmpCollaborationInterface.h"
#include "CollaborationProjectConfigurationType.h"
#include "GbmpQuickCast.h"
#include <vector>

namespace gcmp
{
    /// \brief 协同工程配置接口
    class GCMP_COLLABORATION_INTERFACE_EXPORT ICollaborationProjectConfiguration 
    {
        DEFINE_CAST_BASE(gcmp::ICollaborationProjectConfiguration)
    public:
        /// \brief 获取类型
        /// \return 类型
        /// \see CollaborationProjectConfigurationType
        virtual CollaborationProjectConfigurationType GetType() const = 0;

        /// \brief 获取版本
        /// \return 版本
        virtual int GetVersion() const = 0;

        /// \brief 查询所有版本
        /// \return 所有版本
        virtual std::vector<int> QueryAllVersions() const = 0;

        /// \brief 更新到指定版本
        /// \param version 版本
        /// \return 是否更新成功
        virtual bool Update(int version) = 0;

        /// \brief 析构函数
        virtual ~ICollaborationProjectConfiguration();
    };
}
